package com.glink.manage.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.glink.manage.domain.OrgBean;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface OrgMapper extends BaseMapper<OrgBean> {



    /**
     * 根据orgId查询数量
     * @param orgId 班组
     * @return 数量
     */
    Integer countOrgByOrgId(@Param("orgId") String orgId);

    /**
     * 根据项目部列表查询所有的参建单位ID
     * @param orgIdList 项目部ID
     * @return 参建单位ID
     */
    List<String> findAllParticipatingUnitIdByProjectDepartmentObjIdIn(@Param("orgIdList") List<String> orgIdList);

    /**
     * 根据用户信息和所属项目部ID查询工程现场
     *
     * @param departmentAdminOrgIdList 项目部ID
     * @return 施工现场ID
     */
    List<String> findWorkSiteByDepartmentAdminOrgIdIn(@Param("departmentAdminOrgIdList") List<String> departmentAdminOrgIdList);
    List<String> findWorkSiteBySuperintendent(@Param("userId") String userId);
}
